package com.hcy.rabbitbasicutils.utils;

import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.StringUtils;

import java.util.Collection;
import java.util.Date;

/**
 * @Author huchenying
 * @Description
 * @Date 2022/4/26
 **/
public class CheckUtils {

    public static boolean checkVarIsNotNullOrEmpty(Number number){
        return number != null;
    }
    public static boolean checkVarIsNotNullOrEmpty(String string){
        return StringUtils.isNoneEmpty(string);
    }
    public static boolean checkVarIsNotNullOrEmpty(Collection<Object> collection){
        return CollectionUtils.isNotEmpty(collection);
    }
    public static boolean checkVarIsNotNullOrEmpty(Date date){
        return date != null;
    }
}
